// pages/user/useguide/detail/detail.js
Page({
  data: {
    showTitle: "",
    showContent: "",
    swiperH:'',//swiper高度
    nowIdx:0,//当前swiper索引
    imgList:[//图片列表
      "../../../../images/showPanel.png",
      "../../../../images/showPanel.png",
      "../../../../images/showPanel.png",
    ]
  },


  onLoad: function (options) {
    this.setData({
      showTitle: options,
      showContent: options.showContent
    })
  },

  //获取swiper高度
  getHeight:function(e){
    var winWid = wx.getSystemInfoSync().windowWidth - 2*50;//获取当前屏幕的宽度
    var imgh = e.detail.height;//图片高度
    var imgw = e.detail.width;
    var sH = winWid * imgh / imgw + "px"
    this.setData({
      swiperH: sH//设置高度
    })
  },
  //swiper滑动事件
  swiperChange:function(e){
    this.setData({
      nowIdx: e.detail.current
    })
  }  
})